﻿<%@ Control Language="C#" EnableViewState="true" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<script type="text/javascript" language="javascript">
    var arrProjectInfo = new Array(); 
    function GetSelectProjectInfo() {
        if (document.getElementById("project_id").value == '') {
            alert('请选择项目!');
            return;
        }
        var returnvalue = document.getElementById("project_id").value;
        var retval = returnvalue.substring(0, returnvalue.length - 1).split(',');
        if (retval.length < 5) {
            alert("少于5个");
            return;
        }
        if (retval.length > 5) {
            alert("只能选5个");
            return false;
        }

        window.returnValue = returnvalue.substring(0, returnvalue.length - 1);
        self.close();
    }
    function setValue(obj) {
        var element = document.getElementsByTagName("input");
        if (obj.checked) {
            document.getElementById("project_id").value += obj.id + ",";

        } else {
            document.getElementById("project_id").value = document.getElementById("project_id").value.replace(obj.id + ",", "");
        }

    }
    function setNull() {
        arrProjectInfo.length = 0;
    }
</script>
<center>
        <table border="0" cellpadding="0" cellspacing="0" class="window_tab_list" style="width:450px;">
            <tr>
                <th height="30px">
                    <strong>选择<%=HttpContext.Current.Request.QueryString["userType"]%></strong>
                </th>
            </tr>
            <tr>
                <td>
                    <%=HttpContext.Current.Request.QueryString["userType"]%>名称:<asp:TextBox ID="txt_name" runat="server" Width="100"></asp:TextBox>
                    <asp:Button ID="btn_query" runat="server" SkinID="LightGreen" Text="查询" />
                </td>
            </tr>
            <tr>
                <td width="450px" style="border-left-width:0px; border-right-width:0px;">
                    <CBW:CustomGridView runat="server" ID="List" SkinID="List" ShowCmpAndCancel="false" CustomGridViewStyle="border-left-width:0px; border-right-width:0px;"
                        ShowGridViewSelect="List" ShowHideColModel="None" PageSize="50" AllowPaging="true" Width="450px" AutoGenerateColumns="false"  CustomGridViewClass="window_tab_list_fst">
                        <Columns>
                            <asp:BoundField DataField="单位名称" HeaderText="单位名称" ItemStyle-HorizontalAlign="left"  />
                        </Columns>
                    </CBW:CustomGridView>
                </td>
            </tr>
            <tr>
                <td align="center" height="30px">

                    <input type="button" id="bt_ok" value="确定" onclick="GetSelectProjectInfo();" />
                   <%-- <asp:Button ID="bt_ok" runat="server" SkinID="LightGreen" Text="确定" OnClientClick="GetSelectProjectInfo();return false;" />--%>
                    <asp:Button ID="bt_cancel" runat="server" SkinID="LightGreen" Text="关闭" OnClientClick="javascript:self.close();return false;" />
                </td>
            </tr>
        </table>
    </center>
<input type="hidden" value="" id="project_id" />